package com.mbc.common.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

@SuppressWarnings("serial")
@Entity
@NamedQueries({
	@NamedQuery(name="Branch.findByBranchCode", query="SELECT b FROM Branch b WHERE b.branchCode = :branchCode"),
	@NamedQuery(name="Branch.findAll", query="SELECT b FROM Branch b")
})
public class Branch implements Serializable {

	@Id
	private long branchId;
	private long parentId;
	private long branchTypeId;
	private String branchCode;
	@Basic(optional=false)
	private String name;
	private String myanmarName;
	private String phone;
	private String fax;
	private String email;
	private String address;
	@Basic(optional=false)
	private Date createdDate;
	@Basic(optional=false)
	private long createdBy;
	@Basic(optional=false)
	private Date modifiedDate;
	@Basic(optional=false)
	private long modifiedBy;
	@Basic(optional=false)
	private String city;
	@Basic(optional=false)
	private String country;


	public long getBranchId() {
		return branchId;
	}

	public void setBranchId(long branchId) {
		this.branchId = branchId;
	}

	public long getParentId() {
		return parentId;
	}

	public void setParentId(long parentId) {
		this.parentId = parentId;
	}

	public long getBranchTypeId() {
		return branchTypeId;
	}

	public void setBranchTypeId(long branchTypeId) {
		this.branchTypeId = branchTypeId;
	}

	public String getBranchCode() {
		return branchCode;
	}

	public void setBranchCode(String branchCode) {
		this.branchCode = branchCode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMyanmarName() {
		return myanmarName;
	}

	public void setMyanmarName(String myanmarName) {
		this.myanmarName = myanmarName;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public long getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(long createdBy) {
		this.createdBy = createdBy;
	}

	public Date getModifiedDate() {
		return modifiedDate;
	}

	public void setModifiedDate(Date modifiedDate) {
		this.modifiedDate = modifiedDate;
	}

	public long getModifiedBy() {
		return modifiedBy;
	}

	public void setModifiedBy(long modifiedBy) {
		this.modifiedBy = modifiedBy;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public Branch(){
		clearProperties();
	}

	public void clearProperties(){
		branchId = 0;
		parentId = 0;
		branchTypeId = 0;
		branchCode = "";
		name = "";
		myanmarName = "";
		phone = "";
		fax = "";
		email = "";
		address = "";
		createdDate = new Date();
		createdBy = 0;
		modifiedDate = new Date();
		modifiedBy = 0;
		city = "";
		country = "";
	}


}
